package com.jevons.geo_lib.op_history;


/**
 * Copyright 2020 JxGIS
 *
 * @file DrawType
 * @auth linaisheng
 * Created on 2020/12/2.
 * Description：
 */
public enum DrawType {

    None(-1),
    Huizhi(0),
    Bianjie(1),
    Qiege(2),
    Wakong(3),
    Hebing(4),
    Shanchu(5),
    Wakong2(6),
    ShpHuaFen(7),
    PatrolQiege(8),
    Tianjia(9);


    private int type;

    DrawType(int type) {
        this.type = type;
    }

    public int getType() {
        return type;
    }

    //此方法是关键
    public static DrawType getByType(int type) {
        for (DrawType pointType : values()) {
            if (pointType.getType() == type) {
                return pointType;
            }
        }
        return null;
    }

}
